package cn.edu.gcu.PraticalTraining.serviceimpl;

import java.util.ArrayList;

import javax.annotation.Resource;
import javax.transaction.Transactional;

import org.springframework.stereotype.Service;

import cn.edu.gcu.PraticalTraining.domain.Propaganda;
import cn.edu.gcu.PraticalTraining.repository.PropagandaRepository;
import cn.edu.gcu.PraticalTraining.repository.UserRepository;
import cn.edu.gcu.PraticalTraining.service.PropagandaService;



@Service("propagandaService")
@Transactional
public class PropagandaServiceImpl implements PropagandaService{
	@Resource  
    private PropagandaRepository propagandaRepository;  
	
	public PropagandaServiceImpl(PropagandaRepository propagandaRepository){
		this.propagandaRepository = propagandaRepository;
		
	}
	
	@Override
	public ArrayList <Propaganda> findAll() {
		return propagandaRepository.findAll();		
	}

	@Override
	public ArrayList<Propaganda> findbytitleandnamelike(String title,String	name) {
		// TODO Auto-generated method stub
		return propagandaRepository.findbytitleandnamelike(title,name);
	  
	}

	@Override
	public Propaganda save(Propaganda propaganda) {
		// TODO Auto-generated method stub
		return propagandaRepository.save(propaganda);
	}

	
}
